﻿#include "Sprite.h"

engine::render::Sprite::Sprite(const std::string& texturePath, std::optional<SDL_Rect> srcRect, bool is_flipped_horizontally):
	m_textureID(texturePath), m_srcRect(srcRect), is_flipped(is_flipped_horizontally)
{

}

const std::string& engine::render::Sprite::getTextureID() const
{
	return m_textureID;
}

const std::optional<SDL_Rect>& engine::render::Sprite::getSrcRect() const
{
	return m_srcRect;
}

bool engine::render::Sprite::isFlipped() const
{
	return is_flipped;
}

void engine::render::Sprite::setTextureID(const std::string& textureID)
{
	m_textureID = textureID;
}

void engine::render::Sprite::setSrcRect(const std::optional<SDL_Rect>& srcRect)
{
	m_srcRect = srcRect;
}

void engine::render::Sprite::setFlipped(bool flipped)
{
	is_flipped = flipped;
}
